/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author olawale
 */
@Entity
@Table(name = "calendar")
@NamedQueries({@NamedQuery(name = "GCalendar.findAll", query = "SELECT g FROM GCalendar g")})
public class GCalendar implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "Id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "Name")
    private String name;
    @Basic(optional = false)
    @Column(name = "StartDate")
    @Temporal(TemporalType.DATE)
    private Date startDate;
    @Basic(optional = false)
    @Column(name = "NYears")
    private int nYears;
    @Basic(optional = false)
    @Column(name = "NColumns")
    private int nColumns;
    @Basic(optional = false)
    @Column(name = "NDivisible")
    private int nDivisible;
    @Basic(optional = false)
    @Column(name = "NTimes")
    private int nTimes;
    @Basic(optional = false)
    @Column(name = "Offset")
    private int offset;

    public GCalendar() {
    }

    public GCalendar(Integer id) {
        this.id = id;
    }

    public GCalendar(Integer id, String name, Date startDate, int nYears, int nColumns, int nDivisible, int nTimes, int offset) {
        this.id = id;
        this.name = name;
        this.startDate = startDate;
        this.nYears = nYears;
        this.nColumns = nColumns;
        this.nDivisible = nDivisible;
        this.nTimes = nTimes;
        this.offset = offset;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public int getNYears() {
        return nYears;
    }

    public void setNYears(int nYears) {
        this.nYears = nYears;
    }

    public int getNColumns() {
        return nColumns;
    }

    public void setNColumns(int nColumns) {
        this.nColumns = nColumns;
    }

    public int getNDivisible() {
        return nDivisible;
    }

    public void setNDivisible(int nDivisible) {
        this.nDivisible = nDivisible;
    }

    public int getNTimes() {
        return nTimes;
    }

    public void setNTimes(int nTimes) {
        this.nTimes = nTimes;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GCalendar)) {
            return false;
        }
        GCalendar other = (GCalendar) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.GCalendar[id=" + id + "]";
    }

}
